/*
 * @Author: Yang qiuyou wangyi168359476@163.com
 * @Date: 2024-07-26 11:15:02
 * @LastEditors: 武兴创 superjava@vip.qq.com
 * @LastEditTime: 2024-08-28 17:39:32
 * @FilePath: \SGFEM\DataStructure\FEM\Property\include\PCOMPData.h
 * @Description: PCOMP 复合材料
 *
 */

#pragma once
#include <vector>

#include "DataStructure/Common/DataStructureNamespace.h"
#include "DataStructure/Common/Id.h"
#include "DataStructure/Input/Property/PropertyBase.h"

#include "ShellSectionLayer.h"

SG_DATASTRUCTURE_FEM_NAMESPACE_OPEN
/** \enum LaminateOptions
 * 复合材料铺层选项
 */
enum LaminateOptions : SG::DataStructure::Common::I8
{
    LaminateOption_Blank = 0,  ///< 默认选项
    LaminateOption_SYM = 1,  ///< 对称。指定底部到中间的铺层信息；如果整个铺层为奇数层，中间层厚度（T1）输入为实际值一半
    LaminateOption_MEM    = 2,  ///< 仅仅计算膜部分属性
    LaminateOption_BEND   = 3,  ///< 仅仅计算弯曲部分属性
    LaminateOption_SMEAR  = 4,  ///<
    LaminateOption_SMCORE = 5,  ///<
};

/// @brief 复合材料壳截面
struct PCOMPData : PropertyBase
{
    SG::DataStructure::Common::I64                         m_nplies   = 0;    ///< 铺层数
    SG::DataStructure::Common::Real                        m_offset   = 0.0;  ///< 中面偏置， 默认值为-0.5倍的单元厚度
    SG::DataStructure::Common::Real                        m_nsm      = 0.0;  ///< 单位面积非结构质量
    SG::DataStructure::Common::Real                        m_sb       = 0.0;  ///< 粘结材料的允许剪应力
    SG::DataStructure::Common::I64                         m_ft       = 0;  ///< 失效理论：0=空白，1=HILL，2=HOFF，3=TSAI，4=STRN
    SG::DataStructure::Common::Real                        m_tref     = 0.0;                                    ///< 参考温度
    SG::DataStructure::Common::Real                        m_ge       = 0.0;                                    ///< 阻尼系数
    SG::DataStructure::Common::Id                          m_domainId = 0;
    LaminateOptions                                        m_lam      = LaminateOptions::LaminateOption_Blank;  ///< 铺层选项
    std::vector<SG::DataStructure::FEM::ShellSectionLayer> m_secData;                                           ///< 铺层信息
};

DECLSPEC bool operator== (const PCOMPData &a, const PCOMPData &b);

SG_DATASTRUCTURE_FEM_NAMESPACE_CLOSE